home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / GRAPHICS / UVE138.ZIP / EXAMPLES.ZIP / 500SPR.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1996-08-31  |  912 b   |  41 lines

  1. {$A+,B-,D+,E+,F-,G+,I+,L+,N-,O-,P-,Q-,R-,S+,T-,V+,X+}
  2. {$M 16384,0,655360}
  3.  
  4. {
  5. FAST.PAS
  6. Benchmarking program to check VGA access times as well as UVE32
  7. responce to heavy load.
  8. }
  9.  
  10. uses     crt,uve32;
  11.  
  12. var    active:integer;
  13.     i:integer;
  14. begin
  15.     ia_inituve;
  16.     ia_loadspr('cube.uvl',1);
  17.     ia_chainsprite(1,spritesloaded,1);
  18.     ia_loadpalette('cube.pal',pcxpal);
  19.     ia_loadfont(8);
  20.     ia_setfontattr(8,plain,proportional,horizontal,255,true,0);
  21.     ia_powerup;
  22.     ia_setpalette(pcxpal);
  23.     active:=10;
  24.     ia_setcycletime(50);
  25.     repeat
  26.         if active<500 then begin
  27.             for i:=active-9 to active do begin
  28.                 spr[i].n:=1;
  29.                 spr[i].x:=(i*12) mod 310;
  30.                 spr[i].y:=10*((i*12) div 310);
  31.             end;
  32.             inc(active,10);
  33.             if active>500 then active:=500;
  34.         end;
  35.         ia_doframepart1;
  36.         ia_doframepart2;
  37.         ia_printstr(hidden,-32768,50,i2s(active)+' sprites',37);
  38.         ia_doframepart3;
  39.     until keypressed;
  40.     ia_shutdown;
  41. end.